#!/usr/bin/perl


while (<>) {
	$file .= $_;
}


@vers = split(/(?=\n.*\nv\d)/, $file);

foreach (@vers) {
	s/^\n+//;
	$_ .= "\n" unless /\n$/;
	if (/^v(\d\.\S*)/m) {
		open(V, ">libtomcrypt-$1.log");
	    	print V;
		close(V);
	}
}
